<%@ LANGUAGE="VBSCRIPT" %>
<%'  ------------------------------------------------------------
  '  ViewNativeApp.asp 
  '  ------------------------------------------------------------
  '  VCS INFO:
  '  
  '  $Revision:   1.0  $
  '  $Date:   05 Dec 2000 17:00:26  $
  '  $Author:   syu  $
  '  $Workfile:   viewnativeapp.asp  $
  '  ------------------------------------------------------------
  '  All Rights Reserved.  Copyright (c) 2000-2000 FileNET Corp.
  '  ------------------------------------------------------------
  '%>
<% 'If the user is not logged on, redirect to the Logon page.
RedirectToLogon = 1 %>
<!-- #include file="islogon.asp" -->
<!-- #include file="jscriptfix.asp" -->
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<head>
<meta http-equiv="Content-Type"
content="text/html">
<title>Panagon IDM Viewer Pane</title>
</head>
<BODY BGCOLOR="#ffffff">

<FORM name="ViewForm" onSubmit="return false">

<TABLE HEIGHT="50" BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR></TR>
<TR>
<TD NOWRAP>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<IMG SRC="images/ldoc.gif" WIDTH="34" HEIGHT="39">  Document ID:&nbsp;&nbsp; 
</TD>

<% 'Use different Document List width for IS vs. DS
'Panagon IDM Web application uses the Session variable LibraryLogonID to keep track of
'whether the user has logged on.

LibraryLogonID = Session("LibraryLogonID")

'Create a Library object and reattach the LogonID
Set LibraryObj = Server.CreateObject("IDMObjects.Library")
LibraryObj.LogonId = LibraryLogonID
if LibraryObj.SystemType = Application("idmSysTypeIS") then
    DocListWidth = 200
else
    DocListWidth = 300
end if
%>
<TD valign="bottom" NOWRAP>
	<INPUT TYPE=TEXT name="docnum" VALUE="<%= DocID %>" Size=20 onChange="DisplayDoc(this.value)">&nbsp;&nbsp;
</TD>
<TD valign="bottom">
	<input type="button" value="    OK    " name="OK1" onclick="DisplayDoc(ViewForm.docnum.value)">
</TD>
</TR>
</TABLE>
</FORM>
<SCRIPT LANGUAGE=javascript>
<!--
function ReportError(inp, msg)
{
	//Report the error and set focus
	alert(msg);
	return false;
}
function CheckNum(inp) {
	
	var str = inp;
	var len = str.length;
	var pages = window.dialogArguments
	for (var i=0; i < len; i++) {
		var ch = str.charAt(i);
		if ((ch > '9'  ) || (ch < '0'))
			return ReportError(inp, "Please enter a valid number.");
	}
	return true;
}
function DisplayDoc(docid)
{	
	if (CheckNum (docid)) 
		parent.location.href = "doccontent.asp?DocID=" + docid+ "&StartPage=1";	
	//window.open("doccontent.asp?DocID=" + docid);	
}
//-->
</SCRIPT>

</BODY>
</HTML>
